home *** CD-ROM | disk | FTP | other *** search
- package javax.swing.plaf.basic;
-
- import java.awt.event.ActionEvent;
- import java.beans.PropertyVetoException;
- import javax.swing.AbstractAction;
- import javax.swing.JInternalFrame;
-
- public class BasicDesktopPaneUI$CloseAction extends AbstractAction {
- // $FF: synthetic field
- private final BasicDesktopPaneUI this$0;
-
- protected BasicDesktopPaneUI$CloseAction(BasicDesktopPaneUI var1) {
- this.this$0 = var1;
- }
-
- public void actionPerformed(ActionEvent var1) {
- JInternalFrame[] var2 = this.this$0.desktop.getAllFrames();
- JInternalFrame var3 = null;
- if (var2.length > 0) {
- var3 = var2[0];
- }
-
- if (var3 != null && var3.isClosable()) {
- try {
- var3.setClosed(true);
- } catch (PropertyVetoException var4) {
- }
- }
-
- }
-
- public boolean isEnabled() {
- return true;
- }
- }
-